package com.mydomain.Bodega;

import com.mydomain.Bodega.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

@Name("pgFreespacemapPagesHome")
public class PgFreespacemapPagesHome extends EntityHome<PgFreespacemapPages> {

	public void setPgFreespacemapPagesId(PgFreespacemapPagesId id) {
		setId(id);
	}

	public PgFreespacemapPagesId getPgFreespacemapPagesId() {
		return (PgFreespacemapPagesId) getId();
	}

	public PgFreespacemapPagesHome() {
		setPgFreespacemapPagesId(new PgFreespacemapPagesId());
	}

	@Override
	public boolean isIdDefined() {
		if (getPgFreespacemapPagesId().getBytes() == null)
			return false;
		if (getPgFreespacemapPagesId().getRelblocknumber() == null)
			return false;
		if (getPgFreespacemapPagesId().getReldatabase() == null)
			return false;
		if (getPgFreespacemapPagesId().getRelfilenode() == null)
			return false;
		if (getPgFreespacemapPagesId().getReltablespace() == null)
			return false;
		return true;
	}

	@Override
	protected PgFreespacemapPages createInstance() {
		PgFreespacemapPages pgFreespacemapPages = new PgFreespacemapPages();
		pgFreespacemapPages.setId(new PgFreespacemapPagesId());
		return pgFreespacemapPages;
	}

	public void wire() {
		getInstance();
	}

	public boolean isWired() {
		return true;
	}

	public PgFreespacemapPages getDefinedInstance() {
		return isIdDefined() ? getInstance() : null;
	}

}
